describe 'Contacted Last Popup -'
    before_each
		$('#sandbox').html(fixture('contacted_last_popup_fixture.html'))
        contactedLastPopup = $('#contactedLastPopup')
		noLink = $('#noLink')
        yesLink = $('#yesLink')
        
        popup = new ContactedLastPopup();
	
		yesLinkCallbackCalled = false;
        yesLinkCallback = function() {
			yesLinkCallbackCalled = true;
        };
        popup.initialize(noLink, yesLink, yesLinkCallback);
    end
    
    describe 'when the NO link is clicked on'
        before_each
	        jQuery.fn.fadeOut = jQuery.fn.hide;
            noLink.click();
        end

        it 'the closenessBox should be invisible'
            contactedLastPopup.css("display").should.be 'none'
        end
    end
    
    describe 'when the YES link is clicked on'
        before_each
	        jQuery.fn.fadeOut = jQuery.fn.hide;
			yesLinkCallbackCalled = false;
			yesLink.click();
		end

        it 'the closenessBox should be invisible'
            contactedLastPopup.css("display").should.be 'none'
        end
        it 'the closenessBox should call the given callback'
            yesLinkCallbackCalled.should.be_true
        end
	end
end